/**function keypress(event, formId){
	if(event.keyCode == 13){
		if(validateForm(document.getElementById(formId))){
			$j("#"+formId).submit();
			return false;
		}
	}
	return true;
}**/

function keypressYearMonth(event, formId){
	if(event.keyCode == 13){
		searchByMonth($j("#"+formId));
		searchByYear($j("#"+formId));
		return false;
	}
	return true;
}

function producrSalesRankSearchSubmit(){
	var startTime = document.getElementById('startTime').value;
	var endTime = document.getElementById('endTime').value;
	if(startTime != "" && endTime != ""){
		var b=startTime.replace(/-/g, "/");//2011-08-18  2011/08/18
	    var e=endTime.replace(/-/g, "/");
	    var start=new Date(Date.parse(b));
	    var end=new Date(Date.parse(e));
	    if(end<start){
	    	alert(__FMT.producrSales_RankSearch_Submit);
	    	return;
	    }
    }
	if(validateForm(document.getElementById('reportForm'))){
		$j('#reportForm').submit();
	}
}

function keypress(event, formId){
	if(event.keyCode == 13){
		producrSalesRankSearchSubmit();
		return false;
	}
	return true;
}